package com.beerandjesus.sportofkings.handicapper.dao;

import com.beerandjesus.sportofkings.handicapper.model.TurfSire;

import java.sql.Connection;
import java.math.MathContext;
import java.math.BigDecimal;

/**
 * Date: Jun 7, 2012
 * Time: 6:21:51 PM
 */
public interface TurfSireDAO {
    public String LEADING_TURF_SIRES = "leading_turf_sires";
    public static final String DROP_TABLE_STMT = "drop table " + LEADING_TURF_SIRES;
    public static final String CREATE_TABLE_STMT = "create table " + LEADING_TURF_SIRES +
            " (name varchar(100), percentage decimal(3,2))";

    /**
     * Build (or rebuild) the turf sire database from scratch
     * @throws DAOException
     */
    void buildDatabase() throws DAOException;

    /**
     * Get a count of rows in the turf sire database
     * @throws DAOException
     * @return int The row count
     */
    int getRowCount() throws DAOException;

    /**
     * Get a turf sire record by name
     * @param name
     * @return
     * @throws DAOException
     */
    TurfSire getTurfSireByName(String name) throws DAOException;

    String[] getBaseDataFiles();

    void setBaseDataFiles(String[] baseDataFiles);
}
